﻿using UnityEngine;
using System.Collections;
using System.IO;
using System.Collections.Generic;

public class DataLoader : MonoBehaviour
{
    public static DataLoader Data;                              // instance of  this class

    public static List<Player> MyData = new List<Player>();     // list of Player object

    const string KEY_DATA = "DATA";                             // key PlayerPrefs

    const string KEY_FRISTTIME = "one";                         // key check first app to play 

    public static bool enableclick;

    public const string KEY_MAPPOS = "mappos";

    public GameObject map;

    private GameObject tmp;

    public GameObject mapParent;

    public List<GameObject> listmap1;

    public GameObject[] listmap;

    public Vector2[] mappos = new Vector2[297];

    public UnityEngine.UI.Image processbar;

    public GameObject fade;

    public Sprite[] MapSprite;

    bool hold;

    GameObject holdobj;

    const float STARMOVE_TIME = 0.3f;                             // time of movement icon select level

    void Awake()
    {
        Data = this;
    }
    void Start()
    {
        Time.timeScale = 1;
        listmap = new GameObject[297];
        //PlayerPrefs.DeleteKey(KEY_FRISTTIME);
        if (PlayerPrefs.GetInt(KEY_FRISTTIME, 0) == 0)
        {
            PlayerPrefs.SetString(KEY_DATA, datadefaut);
            PlayerPrefs.SetInt(KEY_FRISTTIME, 1);
        }

        StartCoroutine(MapButtonDrawer());
    }

    GameObject moveobj(Vector3 mouseposition)
    {
        Vector3 wp = Camera.main.ScreenToWorldPoint(mouseposition);
        Vector2 touchPos = new Vector2(wp.x, wp.y);
        if (Physics2D.OverlapPoint(touchPos))
        {
            GameObject tmp = Physics2D.OverlapPoint(touchPos).gameObject;
            if (tmp != null && tmp.tag == "map")
            {
                return tmp;
            }
        }
        return null;
    }

    /// <summary>
    /// Draw buttons level on scene
    /// </summary>
    /// <returns></returns>
    IEnumerator MapButtonDrawer()
    {
        DataLoader.enableclick = false;
        MapPosD();
        processbar.fillAmount = 0.3f;
        PlayerUtils pu = new PlayerUtils();
        MyData = pu.Load();
        processbar.fillAmount = 0f;

        for (int i = 0; i < 99; i++)
        {
            insmap(mappos[i], i);
            insmap(mappos[i + 99], i + 99);
            insmap(mappos[i + 198], i + 198);
            yield return processbar.fillAmount += (float)1 / (mappos.Length / (float)3);
            if(processbar.fillAmount >= 100)
            {
                processbar.transform.parent.gameObject.SetActive(false);
            }
        }
        if(processbar.gameObject.activeSelf)
            processbar.transform.parent.gameObject.SetActive(false);
        DataLoader.enableclick = true;
        if (CameraMovement.StarPointMoveIndex != -1 && CameraMovement.StarPointMoveIndex != 297)
        {
            StarPointMove();
            yield return new WaitForSeconds(STARMOVE_TIME);
            CameraMovement.mcamera.PopUpShow(MyData[CameraMovement.StarPointMoveIndex]);

            PlayerPrefs.SetFloat("LASTPOS", listmap[CameraMovement.StarPointMoveIndex].transform.position.y);
            PlayerPrefs.SetFloat("LASTPOSX", listmap[CameraMovement.StarPointMoveIndex].transform.position.x);

        }
        else
        {
            fade.GetComponent<CanvasGroup>().blocksRaycasts = false;
            CameraMovement.mcamera.StarPoint.transform.GetChild(0).GetComponent<Animation>().Play("StarPoint");
        }
    }



    Vector3 StringToVector3(string s)
    {
        Vector3 vt = Vector3.zero;
        string[] p = s.Split(',');
        vt = new Vector3(float.Parse(p[0]), float.Parse(p[1]));
        return vt;
    }

    void insmap(Vector3 pos, int index)
    {

        tmp = (GameObject)Instantiate(map);
        tmp.transform.position = new Vector3(pos.x, pos.y);
        tmp.transform.SetParent(mapParent.transform, false);
        listmap[index] = tmp;
        tmp.transform.GetChild(1).GetComponent<TextMesh>().text = (index + 1).ToString();
        tmp.name = (index + 1).ToString();
        Map m = tmp.GetComponent<Map>();
        m.map = MyData[index];
        m.SetMapInfo();
    }

    void StarPointMove()
    {
        DataLoader.enableclick = false;
        Vector3 newpos = listmap[CameraMovement.StarPointMoveIndex].transform.position + new Vector3(0, 0, -0.3f);
        Ulti.MoveTo(CameraMovement.mcamera.StarPoint, newpos, STARMOVE_TIME, newpos.z);
        StartCoroutine(stopanimation());
    }
    IEnumerator stopanimation()
    {
        CameraMovement.mcamera.StarPoint.transform.GetChild(0).transform.localPosition = new Vector3(0, 0.619f, 0);
        yield return new WaitForSeconds(STARMOVE_TIME);
        CameraMovement.mcamera.StarPoint.transform.GetChild(0).GetComponent<Animation>().Play("StarPoint");
    }

    #region
    string datadefaut = "False,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,1,True,0,0,1,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,3,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,1,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,0,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,True,0,0,2,";
    /// <summary>
    /// position of buttons level is fixed
    /// </summary>
    void MapPosD()
    {

        mappos[0] = new Vector2(-0.004228723f, -3.587f);
		mappos[1] = new Vector2(-0.88f, -3.56f);
		mappos[2] = new Vector2(-1.74f, -3.22f);
		mappos[3] = new Vector2(-0.85f, -2.859967f);
		mappos[4] = new Vector2(-1.65f, -2.489f);
		mappos[5] = new Vector2(-0.77f, -2.18f);
		mappos[6] = new Vector2(-1.53f, -1.79f);
		mappos[7] = new Vector2(-0.58f, -1.56f);
		mappos[8] = new Vector2(-1.29f, -1.03f);
		mappos[9] = new Vector2(0.04f, -0.9f);
		mappos[10] = new Vector2(0.68f, -0.31f);
		mappos[11] = new Vector2(1.51f, -0.12f);
		mappos[12] = new Vector2(0.65f, 0.36f);
		mappos[13] = new Vector2(1.39f, 0.82f);
		mappos[14] = new Vector2(0.5f, 1.22f);
		mappos[15] = new Vector2(1.23f, 1.53f);
		mappos[16] = new Vector2(0.01f, 1.736f);
		mappos[17] = new Vector2(0.65f, 2.4f);
		mappos[18] = new Vector2(-1.53f, 1.52f);
		mappos[19] = new Vector2(-0.84f, 2f);
		mappos[20] = new Vector2(-1.67f, 2.29f);
		mappos[21] = new Vector2(-0.99f, 2.83f);
		mappos[22] = new Vector2(-1.87f, 3.106f);
		mappos[23] = new Vector2(-1.15f, 3.45f);
		mappos[24] = new Vector2(-0.88f, 4.44f);
		mappos[25] = new Vector2(-1.74f, 4.78f);
		mappos[26] = new Vector2(-0.85f, 5.140033f);
		mappos[27] = new Vector2(-1.65f, 5.511f);
		mappos[28] = new Vector2(-0.77f, 5.82f);
		mappos[29] = new Vector2(-1.53f, 6.21f);
		mappos[30] = new Vector2(-0.58f, 6.44f);
		mappos[31] = new Vector2(-1.29f, 6.97f);
		mappos[32] = new Vector2(0.04f, 7.1f);
		mappos[33] = new Vector2(0.68f, 7.69f);
		mappos[34] = new Vector2(1.51f, 7.88f);
		mappos[35] = new Vector2(0.65f, 8.36f);
		mappos[36] = new Vector2(1.39f, 8.82f);
		mappos[37] = new Vector2(0.5f, 9.22f);
		mappos[38] = new Vector2(1.23f, 9.53f);
		mappos[39] = new Vector2(0.01f, 9.736f);
		mappos[40] = new Vector2(0.65f, 10.4f);
		mappos[41] = new Vector2(-1.53f, 9.52f);
		mappos[42] = new Vector2(-0.84f, 10f);
		mappos[43] = new Vector2(-1.67f, 10.29f);
		mappos[44] = new Vector2(-0.99f, 10.83f);
		mappos[45] = new Vector2(-1.87f, 11.106f);
		mappos[46] = new Vector2(-1.15f, 11.45f);
		mappos[47] = new Vector2(-0.88f, 12.44f);
		mappos[48] = new Vector2(-1.74f, 12.78f);
		mappos[49] = new Vector2(-0.85f, 13.140033f);
		mappos[50] = new Vector2(-1.65f, 13.511f);
		mappos[51] = new Vector2(-0.77f, 13.82f);
		mappos[52] = new Vector2(-1.53f, 14.21f);
		mappos[53] = new Vector2(-0.58f, 14.44f);
		mappos[54] = new Vector2(-1.29f, 14.97f);
		mappos[55] = new Vector2(0.04f, 15.1f);
		mappos[56] = new Vector2(0.68f, 15.69f);
		mappos[57] = new Vector2(1.51f, 15.88f);
		mappos[58] = new Vector2(0.65f, 16.36f);
		mappos[59] = new Vector2(1.39f, 16.82f);
		mappos[60] = new Vector2(0.5f, 17.22f);
		mappos[61] = new Vector2(1.23f, 17.53f);
		mappos[62] = new Vector2(0.01f, 17.736f);
		mappos[63] = new Vector2(0.65f, 18.4f);
		mappos[64] = new Vector2(-1.53f, 17.52f);
		mappos[65] = new Vector2(-0.84f, 18f);
		mappos[66] = new Vector2(-1.67f, 18.29f);
		mappos[67] = new Vector2(-0.99f, 18.83f);
		mappos[68] = new Vector2(-1.87f, 19.106f);
		mappos[69] = new Vector2(-1.15f, 19.45f);
		mappos[70] = new Vector2(-0.88f, 20.44f);
		mappos[71] = new Vector2(-1.74f, 20.78f);
		mappos[72] = new Vector2(-0.85f, 21.140033f);
		mappos[73] = new Vector2(-1.65f, 21.511f);
		mappos[74] = new Vector2(-0.77f, 21.82f);
		mappos[75] = new Vector2(-1.53f, 22.21f);
		mappos[76] = new Vector2(-0.58f, 22.44f);
		mappos[77] = new Vector2(-1.29f, 22.97f);
		mappos[78] = new Vector2(0.04f, 23.1f);
		mappos[79] = new Vector2(0.68f, 23.69f);
		mappos[80] = new Vector2(1.51f, 23.88f);
		mappos[81] = new Vector2(0.65f, 24.36f);
		mappos[82] = new Vector2(1.39f, 24.82f);
		mappos[83] = new Vector2(0.5f, 25.22f);
		mappos[84] = new Vector2(1.23f, 25.53f);
		mappos[85] = new Vector2(0.01f, 25.736f);
		mappos[86] = new Vector2(0.65f, 26.4f);
		mappos[87] = new Vector2(-1.53f, 25.52f);
		mappos[88] = new Vector2(-0.84f, 26f);
		mappos[89] = new Vector2(-1.67f, 26.29f);
		mappos[90] = new Vector2(-0.99f, 26.83f);
		mappos[91] = new Vector2(-1.87f, 27.106f);
		mappos[92] = new Vector2(-1.15f, 27.45f);
		mappos[93] = new Vector2(-0.88f, 28.44f);
		mappos[94] = new Vector2(-1.74f, 28.78f);
		mappos[95] = new Vector2(-0.85f, 29.140033f);
		mappos[96] = new Vector2(-1.65f, 29.511f);
		mappos[97] = new Vector2(-0.77f, 29.82f);
		mappos[98] = new Vector2(-1.53f, 30.21f);
		mappos[99] = new Vector2(-0.58f, 30.44f);
		mappos[100] = new Vector2(-1.29f, 30.97f);
		mappos[101] = new Vector2(0.04f, 31.1f);
		mappos[102] = new Vector2(0.68f, 31.69f);
		mappos[103] = new Vector2(1.51f, 31.88f);
		mappos[104] = new Vector2(0.65f, 32.36f);
		mappos[105] = new Vector2(1.39f, 32.82f);
		mappos[106] = new Vector2(0.5f, 33.22f);
		mappos[107] = new Vector2(1.23f, 33.53f);
		mappos[108] = new Vector2(0.01f, 33.736f);
		mappos[109] = new Vector2(0.65f, 34.4f);
		mappos[110] = new Vector2(-1.53f, 33.52f);
		mappos[111] = new Vector2(-0.84f, 34f);
		mappos[112] = new Vector2(-1.67f, 34.29f);
		mappos[113] = new Vector2(-0.99f, 34.83f);
		mappos[114] = new Vector2(-1.87f, 35.106f);
		mappos[115] = new Vector2(-1.15f, 35.45f);
		mappos[116] = new Vector2(-0.88f, 36.44f);
		mappos[117] = new Vector2(-1.74f, 36.78f);
		mappos[118] = new Vector2(-0.85f, 37.140033f);
		mappos[119] = new Vector2(-1.65f, 37.511f);
		mappos[120] = new Vector2(-0.77f, 37.82f);
		mappos[121] = new Vector2(-1.53f, 38.21f);
		mappos[122] = new Vector2(-0.58f, 38.44f);
		mappos[123] = new Vector2(-1.29f, 38.97f);
		mappos[124] = new Vector2(0.04f, 39.1f);
		mappos[125] = new Vector2(0.68f, 39.69f);
		mappos[126] = new Vector2(1.51f, 39.88f);
		mappos[127] = new Vector2(0.65f, 40.36f);
		mappos[128] = new Vector2(1.39f, 40.82f);
		mappos[129] = new Vector2(0.5f, 41.22f);
		mappos[130] = new Vector2(1.23f, 41.53f);
		mappos[131] = new Vector2(0.01f, 41.736f);
		mappos[132] = new Vector2(0.65f, 42.4f);
		mappos[133] = new Vector2(-1.53f, 41.52f);
		mappos[134] = new Vector2(-0.84f, 42f);
		mappos[135] = new Vector2(-1.67f, 42.29f);
		mappos[136] = new Vector2(-0.99f, 42.83f);
		mappos[137] = new Vector2(-1.87f, 43.106f);
		mappos[138] = new Vector2(-1.15f, 43.45f);
		mappos[139] = new Vector2(-0.88f, 44.44f);
		mappos[140] = new Vector2(-1.74f, 44.78f);
		mappos[141] = new Vector2(-0.85f, 45.140033f);
		mappos[142] = new Vector2(-1.65f, 45.511f);
		mappos[143] = new Vector2(-0.77f, 45.82f);
		mappos[144] = new Vector2(-1.53f, 46.21f);
		mappos[145] = new Vector2(-0.58f, 46.44f);
		mappos[146] = new Vector2(-1.29f, 46.97f);
		mappos[147] = new Vector2(0.04f, 47.1f);
		mappos[148] = new Vector2(0.68f, 47.69f);
		mappos[149] = new Vector2(1.51f, 47.88f);
		mappos[150] = new Vector2(0.65f, 48.36f);
		mappos[151] = new Vector2(1.39f, 48.82f);
		mappos[152] = new Vector2(0.5f, 49.22f);
		mappos[153] = new Vector2(1.23f, 49.53f);
		mappos[154] = new Vector2(0.01f, 49.736f);
		mappos[155] = new Vector2(0.65f, 50.4f);
		mappos[156] = new Vector2(-1.53f, 49.52f);
		mappos[157] = new Vector2(-0.84f, 50f);
		mappos[158] = new Vector2(-1.67f, 50.29f);
		mappos[159] = new Vector2(-0.99f, 50.83f);
		mappos[160] = new Vector2(-1.87f, 51.106f);
		mappos[161] = new Vector2(-1.15f, 51.45f);
		mappos[162] = new Vector2(-0.88f, 52.44f);
		mappos[163] = new Vector2(-1.74f, 52.78f);
		mappos[164] = new Vector2(-0.85f, 53.140033f);
		mappos[165] = new Vector2(-1.65f, 53.511f);
		mappos[166] = new Vector2(-0.77f, 53.82f);
		mappos[167] = new Vector2(-1.53f, 54.21f);
		mappos[168] = new Vector2(-0.58f, 54.44f);
		mappos[169] = new Vector2(-1.29f, 54.97f);
		mappos[170] = new Vector2(0.04f, 55.1f);
		mappos[171] = new Vector2(0.68f, 55.69f);
		mappos[172] = new Vector2(1.51f, 55.88f);
		mappos[173] = new Vector2(0.65f, 56.36f);
		mappos[174] = new Vector2(1.39f, 56.82f);
		mappos[175] = new Vector2(0.5f, 57.22f);
		mappos[176] = new Vector2(1.23f, 57.53f);
		mappos[177] = new Vector2(0.01f, 57.736f);
		mappos[178] = new Vector2(0.65f, 58.4f);
		mappos[179] = new Vector2(-1.53f, 57.52f);
		mappos[180] = new Vector2(-0.84f, 58f);
		mappos[181] = new Vector2(-1.67f, 58.29f);
		mappos[182] = new Vector2(-0.99f, 58.83f);
		mappos[183] = new Vector2(-1.87f, 59.106f);
		mappos[184] = new Vector2(-1.15f, 59.45f);
		mappos[185] = new Vector2(-0.88f, 60.44f);
		mappos[186] = new Vector2(-1.74f, 60.78f);
		mappos[187] = new Vector2(-0.85f, 61.140033f);
		mappos[188] = new Vector2(-1.65f, 61.511f);
		mappos[189] = new Vector2(-0.77f, 61.82f);
		mappos[190] = new Vector2(-1.53f, 62.21f);
		mappos[191] = new Vector2(-0.58f, 62.44f);
		mappos[192] = new Vector2(-1.29f, 62.97f);
		mappos[193] = new Vector2(0.04f, 63.1f);
		mappos[194] = new Vector2(0.68f, 63.69f);
		mappos[195] = new Vector2(1.51f, 63.88f);
		mappos[196] = new Vector2(0.65f, 64.36f);
		mappos[197] = new Vector2(1.39f, 64.82f);
		mappos[198] = new Vector2(0.5f, 65.22f);
		mappos[199] = new Vector2(1.23f, 65.53f);
		mappos[200] = new Vector2(0.01f, 65.736f);
		mappos[201] = new Vector2(0.65f, 66.4f);
		mappos[202] = new Vector2(-1.53f, 65.52f);
		mappos[203] = new Vector2(-0.84f, 66f);
		mappos[204] = new Vector2(-1.67f, 66.29f);
		mappos[205] = new Vector2(-0.99f, 66.83f);
		mappos[206] = new Vector2(-1.87f, 67.106f);
		mappos[207] = new Vector2(-1.15f, 67.45f);
		mappos[208] = new Vector2(-0.88f, 68.44f);
		mappos[209] = new Vector2(-1.74f, 68.78f);
		mappos[210] = new Vector2(-0.85f, 69.140033f);
		mappos[211] = new Vector2(-1.65f, 69.511f);
		mappos[212] = new Vector2(-0.77f, 69.82f);
		mappos[213] = new Vector2(-1.53f, 70.21f);
		mappos[214] = new Vector2(-0.58f, 70.44f);
		mappos[215] = new Vector2(-1.29f, 70.97f);
		mappos[216] = new Vector2(0.04f, 71.1f);
		mappos[217] = new Vector2(0.68f, 71.69f);
		mappos[218] = new Vector2(1.51f, 71.88f);
		mappos[219] = new Vector2(0.65f, 72.36f);
		mappos[220] = new Vector2(1.39f, 72.82f);
		mappos[221] = new Vector2(0.5f, 73.22f);
		mappos[222] = new Vector2(1.23f, 73.53f);
		mappos[223] = new Vector2(0.01f, 73.736f);
		mappos[224] = new Vector2(0.65f, 74.4f);
		mappos[225] = new Vector2(-1.53f, 73.52f);
		mappos[226] = new Vector2(-0.84f, 74f);
		mappos[227] = new Vector2(-1.67f, 74.29f);
		mappos[228] = new Vector2(-0.99f, 74.83f);
		mappos[229] = new Vector2(-1.87f, 75.106f);
		mappos[230] = new Vector2(-1.15f, 75.45f);
		mappos[231] = new Vector2(-0.88f, 76.44f);
		mappos[232] = new Vector2(-1.74f, 76.78f);
		mappos[233] = new Vector2(-0.85f, 77.140033f);
		mappos[234] = new Vector2(-1.65f, 77.511f);
		mappos[235] = new Vector2(-0.77f, 77.82f);
		mappos[236] = new Vector2(-1.53f, 78.21f);
		mappos[237] = new Vector2(-0.58f, 78.44f);
		mappos[238] = new Vector2(-1.29f, 78.97f);
		mappos[239] = new Vector2(0.04f, 79.1f);
		mappos[240] = new Vector2(0.68f, 79.69f);
		mappos[241] = new Vector2(1.51f, 79.88f);
		mappos[242] = new Vector2(0.65f, 80.36f);
		mappos[243] = new Vector2(1.39f, 80.82f);
		mappos[244] = new Vector2(0.5f, 81.22f);
		mappos[245] = new Vector2(1.23f, 81.53f);
		mappos[246] = new Vector2(0.01f, 81.736f);
		mappos[247] = new Vector2(0.65f, 82.4f);
		mappos[248] = new Vector2(-1.53f, 81.52f);
		mappos[249] = new Vector2(-0.84f, 82f);
		mappos[250] = new Vector2(-1.67f, 82.29f);
		mappos[251] = new Vector2(-0.99f, 82.83f);
		mappos[252] = new Vector2(-1.87f, 83.106f);
		mappos[253] = new Vector2(-1.15f, 83.45f);
		mappos[254] = new Vector2(-0.88f, 84.44f);
		mappos[255] = new Vector2(-1.74f, 84.78f);
		mappos[256] = new Vector2(-0.85f, 85.140033f);
		mappos[257] = new Vector2(-1.65f, 85.511f);
		mappos[258] = new Vector2(-0.77f, 85.82f);
		mappos[259] = new Vector2(-1.53f, 86.21f);
		mappos[260] = new Vector2(-0.58f, 86.44f);
		mappos[261] = new Vector2(-1.29f, 86.97f);
		mappos[262] = new Vector2(0.04f, 87.1f);
		mappos[263] = new Vector2(0.68f, 87.69f);
		mappos[264] = new Vector2(1.51f, 87.88f);
		mappos[265] = new Vector2(0.65f, 88.36f);
		mappos[266] = new Vector2(1.39f, 88.82f);
		mappos[267] = new Vector2(0.5f, 89.22f);
		mappos[268] = new Vector2(1.23f, 89.53f);
		mappos[269] = new Vector2(0.01f, 89.736f);
		mappos[270] = new Vector2(0.65f, 90.4f);
		mappos[271] = new Vector2(-1.53f, 89.52f);
		mappos[272] = new Vector2(-0.84f, 90f);
		mappos[273] = new Vector2(-1.67f, 90.29f);
		mappos[274] = new Vector2(-0.99f, 90.83f);
		mappos[275] = new Vector2(-1.87f, 91.106f);
		mappos[276] = new Vector2(-1.15f, 91.45f);
		mappos[277] = new Vector2(-0.88f, 92.44f);
		mappos[278] = new Vector2(-1.74f, 92.78f);
		mappos[279] = new Vector2(-0.85f, 93.140033f);
		mappos[280] = new Vector2(-1.65f, 93.511f);
		mappos[281] = new Vector2(-0.77f, 93.82f);
		mappos[282] = new Vector2(-1.53f, 94.21f);
		mappos[283] = new Vector2(-0.58f, 94.44f);
		mappos[284] = new Vector2(-1.29f, 94.97f);
		mappos[285] = new Vector2(0.04f, 95.1f);
		mappos[286] = new Vector2(0.68f, 95.69f);
		mappos[287] = new Vector2(1.51f, 95.88f);
		mappos[288] = new Vector2(0.65f, 96.36f);
		mappos[289] = new Vector2(1.39f, 96.82f);
		mappos[290] = new Vector2(0.5f, 97.22f);
		mappos[291] = new Vector2(1.23f, 97.53f);
		mappos[292] = new Vector2(0.01f, 97.736f);
		mappos[293] = new Vector2(0.65f, 98.4f);
		mappos[294] = new Vector2(-1.53f, 97.52f);
		mappos[295] = new Vector2(-0.84f, 98f);
		mappos[296] = new Vector2(-1.67f, 98.29f);

    }
    #endregion

}

